/* Copyright (c) [2020] [ylc]. Licensed under Apache-2.0 License. */

#include "mcu_it.h"
#include "my_uart.h"


//定时器周期中断 1ms
void Timer_Handler(void)		//interrupt 1	//51单片机这里根据手册填中断线
{
	uart_timing_1ms();
}



//串口中断
void UART_IRQHandler(void)		//interrupt 7	//51单片机这里根据手册填中断线
{	
	if(uart_get_flag(UART_FLAG_IT_RC)){		//接收中断
		uart_clear_flag(UART_FLAG_IT_RC);

		uart_get_rx_data_it(0);
	}

	if(uart_get_flag(UART_FLAG_IT_TC)){		//发送中断
		uart_clear_flag(UART_FLAG_IT_TC);
		uart_set_tx_data_it();
		
	}
}



